package com.example.demo.dao;

import com.example.demo.model.LabelModel;
import org.apache.ibatis.annotations.Mapper;
import com.example.demo.model.ArticleModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleDao {

    int addArticle(ArticleModel articleModel);

    ArticleModel getArticleInfoById(int articleId);

    List<ArticleModel> getArticleAllList(String orderBy);

    List<ArticleModel> getArticleVisitAllList(@Param("labelId") int labelId, @Param("categoryId") int categoryId, @Param("orderBy") String orderBy);

    /**
     * 根据ID查询文章标签信息
     * @param id
     * @return
     */
    ArticleModel getArticleInfoById(Long id);

    /**
     * 获取文章标签列表
     * @return
     */
    List<ArticleModel> getArticleList(String title);

    /**
     * 根据ID修改标签
     * @param articleModel
     * @return
     */
    boolean updateArticleById(ArticleModel articleModel);

    boolean del(Long id);
}
